﻿using System;
using FU.Capstones.IMS.Web.Common;
using FU.Capstones.IMS.Web.Common.InventoryServiceProxy.DataContracts;
using FU.Capstones.IMS.Web.Common.InventoryServiceProxy.EventArgs;

namespace FU.Capstones.IMS.Web.Silverlight.Models
{
    public class MaterialExportModel:ModelBase
    {
        public MaterialExportModel()
        {
            client.GetSingleWarehouseCompleted += DoGetSingleWarehouseCompleted;

        }
        #region DoGetSingleWarehouseCompleted

        public event EventHandler<SingleFeedbackCompletedEventArgs<Warehouse>> GetSingleWarehouseCompleted;
        void DoGetSingleWarehouseCompleted(object sender, SingleFeedbackCompletedEventArgs<Warehouse> e)
        {
            if (GetSingleWarehouseCompleted != null)
            {
                GetSingleWarehouseCompleted(sender, e);
            }
        }
        public int GetSingleWarehouseAsync(int warehouseId)
        {
            client.GetSingleWarehouseAsync(warehouseId);
            return WebConstants.MagicNumer;
        }

        #endregion
    }
    // public MaterialExportModel()
    //    {
    //        client.GetMaterialCollectionTypeCompleted += DoGetMaterialCollectionCompleted;

    //    }
    //    #region GetMaterialCollectionCompleted

    //    public event EventHandler<CollectionFeedbackCompletedEventArgs<Material>> GetMaterialCollectionCompleted;
    //    void DoGetMaterialCollectionCompleted(object sender, CollectionFeedbackCompletedEventArgs<Material> e)
    //    {
    //        if (GetMaterialCollectionCompleted != null)
    //        {
    //            GetMaterialCollectionCompleted(sender, e);
    //        }
    //    }
    //    public int GetMaterialCollectionAsync(bool isShowAll)
    //    {
    //        client.GetMaterialCollectionTypeAsync(isShowAll);
    //        return WebConstants.MagicNumer;
    //    }

    //    #endregion
    //}
}
